package com.bdweb.threadPool;

import com.bdweb.dao.TaskDao;
import com.bdweb.model.TASK;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;

import org.springframework.boot.context.event.ApplicationStartedEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class StartupRunner implements ApplicationRunner, ApplicationListener<ApplicationStartedEvent> {
@Autowired
  private TaskDao taskDao;
@Autowired
    openAllTime openAllTime;
    @Override
    public void run(ApplicationArguments args) throws Exception {


                openAllTime.openall();

    }

    @Override
    public void onApplicationEvent(ApplicationStartedEvent event) {

    }


}